<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title> report </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
    <?php htmlhead(); ?>
  </head>
  
  <body>

    <form method="post" action="?act=report_autoparser" name="myform" id="myform" class="myform" onsubmit="return onsubmit();">
      <div class="panel">      
        <div class="t">活动数据导入</div>
        <dl>
          <dt>数据类型:</dt>
          <dd>
            <select name="datatype">
              <option value="MIDKP">MiDKP</option>
              <option value="MERDKP">MerDKP</option>
              <option value="CTRT">CT_RaidTracker</option>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>DKP类型:</dt>
          <dd>
            <select name="type_id">
            <?php
              foreach($dkptypes as $_=>$v) {
                echo('<option value="'.$v['type_id'].'">'.$v['type_name'].'</option>');
              }
            ?>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>选择副本:</dt>
          <dd><input type="text" id="instance_name" name="instance_name" value="" title="双击下拉选择" /></dd>
        </dl>
        <dl>
          <dt>活动名称:</dt>
          <dd><input type="text" id="event_name" name="event_name" value="" title="空值则自动使用解析名称" /></dd>
        </dl>
        <dl>
          <dt>活动数据:</dt>
          <dd><textarea name="content" style="height:300px;"></textarea></dd>
        </dl>
        <dl><dt></dt>
          <dd><input type="submit" value="提交" class="btn" /></dd>
        </dl>
      </div>
    </form>

    <script>
      function onsubmit() {
        showTip("数据正在解析中.........",null,0);
        return true;
      }
      var instance_names = [<?php echo splitarray($instances,'instance_name');?>];      
      $('#instance_name').autocomplete(instance_names,{ minChars: 0 });
      $('.panel [title]').tipsy({gravity:'s'});
      <?php echo getTips(); ?>
    </script>
    
</body>
</html>